﻿#ifndef QSALAYDELEGATE_H
#define QSALAYDELEGATE_H

#include <QStyledItemDelegate>

class QSalayDelegate:public QStyledItemDelegate
{
    Q_OBJECT
public:
    QSalayDelegate(QObject*parent=0);

    QWidget *createEditor(QWidget *parent,
                          const QStyleOptionViewItem &option,
                          const QModelIndex &index) const override;

    void setEditorData(QWidget *editor, const QModelIndex &index) const override;
    void setModelData(QWidget *editor,
                      QAbstractItemModel *model,
                      const QModelIndex &index) const override;

    void updateEditorGeometry(QWidget *editor,
                              const QStyleOptionViewItem &option,
                              const QModelIndex &index) const override;

};

#endif // QSALAYDELEGATE_H
